/* 黄金价格监控系统 - 样式文件 */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    min-height: 100vh; 
    padding: 20px; 
}

.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    background: rgba(255,255,255,0.95); 
    border-radius: 20px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); 
    overflow: hidden; 
}

.header { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    padding: 30px; 
    text-align: center; 
}

.header h1 { 
    font-size: 2em; 
    font-weight: 300; 
    letter-spacing: 2px; 
}

.nav-tabs { 
    display: flex; 
    background: #f8f9fa; 
    border-bottom: 1px solid #dee2e6; 
}

.nav-tab { 
    flex: 1; 
    padding: 15px; 
    text-align: center; 
    cursor: pointer; 
    border: none; 
    background: none; 
    font-size: 16px; 
    color: #666; 
    transition: all 0.3s; 
}

.nav-tab:hover { 
    background: rgba(0,0,0,0.05); 
}

.nav-tab.active { 
    color: #667eea; 
    border-bottom: 3px solid #667eea; 
    background: white; 
}

.tab-content { 
    padding: 30px; 
}

.tab-pane { 
    display: none; 
    animation: fadeIn 0.3s; 
}

.tab-pane.active { 
    display: block; 
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

.date-display {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
    display: inline-block;
}

.date-range-selector {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.source-selector { 
    margin: 20px 0; 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    flex-wrap: wrap; 
}

.source-btn { 
    padding: 8px 20px; 
    border: 1px solid #667eea; 
    background: white; 
    color: #667eea; 
    border-radius: 20px; 
    cursor: pointer; 
    transition: all 0.3s; 
    font-size: 14px; 
}

.source-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(102,126,234,0.3); 
}

.source-btn.active { 
    background: #667eea; 
    color: white; 
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 20px 0;
    position: relative;
    height: 450px;
    touch-action: manipulation;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.chart-container canvas {
    cursor: grab;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    pointer-events: auto;
}

.chart-container canvas:active {
    cursor: grabbing;
}

.chart-container:active canvas {
    cursor: grabbing;
}

.chart-reset-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #667eea;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
    transition: all 0.3s;
}

.chart-reset-btn:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.chart-hint {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    z-index: 10;
    border: 1px solid rgba(102, 126, 234, 0.2);
    animation: fadeIn 0.5s;
}

.price-display { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); 
    color: white; 
    padding: 20px; 
    border-radius: 15px; 
    margin: 20px 0; 
    text-align: center; 
    font-size: 1.5em; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); 
}

.data-card { 
    background: white; 
    border-radius: 15px; 
    padding: 25px; 
    margin: 20px 0; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); 
}

.data-card h5 { 
    color: #333; 
    margin-bottom: 20px; 
    font-size: 1.2em; 
    border-bottom: 2px solid #667eea; 
    padding-bottom: 10px; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
}

th, td { 
    padding: 12px; 
    text-align: left; 
    border-bottom: 1px solid #eee; 
}

th { 
    background: #f8f9fa; 
    color: #667eea; 
    font-weight: 600; 
}

tbody tr:hover { 
    background: #f8f9fa; 
    transition: background 0.3s; 
}

.clickable-value {
    cursor: pointer;
    transition: all 0.2s;
}

.clickable-value:hover {
    color: #667eea;
    text-decoration: underline;
    font-weight: 600;
}

.form-group { 
    margin: 20px 0; 
}

.form-label { 
    display: block; 
    margin-bottom: 8px; 
    color: #666; 
    font-weight: 500; 
}

.form-control { 
    width: 100%; 
    padding: 10px 15px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    font-size: 16px; 
    transition: border-color 0.3s; 
}

.form-control:focus { 
    outline: none; 
    border-color: #667eea; 
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1); 
}

.btn { 
    padding: 10px 25px; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 16px; 
    transition: all 0.3s; 
    display: inline-block; 
}

.btn-primary { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
}

.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 5px 20px rgba(102,126,234,0.4); 
}

.btn-secondary { 
    background: #6c757d; 
    color: white; 
}

.btn-danger { 
    background: #dc3545; 
    color: white; 
}

.btn-success { 
    background: #28a745; 
    color: white; 
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 14px;
}

.alert { 
    padding: 15px; 
    border-radius: 8px; 
    margin: 15px 0; 
    animation: slideIn 0.3s; 
}

@keyframes slideIn { 
    from { transform: translateY(-20px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

.alert-success { 
    background: #d4edda; 
    color: #155724; 
    border: 1px solid #c3e6cb; 
}

.alert-danger { 
    background: #f8d7da; 
    color: #721c24; 
    border: 1px solid #f5c6cb; 
}

.backup-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px; 
    margin: 10px 0; 
    background: #f8f9fa; 
    border-radius: 10px; 
    transition: all 0.3s; 
}

.backup-item:hover { 
    background: #e9ecef; 
    transform: translateX(5px); 
}

.backup-info { 
    flex: 1; 
}

.backup-name { 
    font-weight: 600; 
    color: #333; 
    margin-bottom: 5px; 
}

.backup-meta { 
    color: #666; 
    font-size: 0.9em; 
}

.backup-actions { 
    display: flex; 
    gap: 10px; 
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.pagination { 
    display: flex; 
    justify-content: center; 
    margin: 20px 0; 
    gap: 5px; 
}

.pagination button { 
    padding: 8px 15px; 
    border: 1px solid #ddd; 
    background: white; 
    cursor: pointer; 
    border-radius: 4px; 
    transition: all 0.3s; 
}

.pagination button:hover { 
    background: #f8f9fa; 
}

.pagination button.active { 
    background: #667eea; 
    color: white; 
    border-color: #667eea; 
}

.pagination button:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.footer { 
    text-align: center; 
    padding: 20px; 
    color: #666; 
    font-size: 0.9em; 
}

.extremes-display { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    margin: 20px 0; 
}

.extreme-card { 
    text-align: center; 
    padding: 20px; 
    background: #f8f9fa; 
    border-radius: 10px; 
}

.extreme-value { 
    font-size: 1.5em; 
    font-weight: bold; 
    margin-top: 10px; 
}

.extreme-high { 
    color: #dc3545; 
}

.extreme-low { 
    color: #28a745; 
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .header h1 {
        font-size: 1.5em;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .source-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-range-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .extremes-display {
        grid-template-columns: 1fr;
    }
}





